<html>

<head>

<style type="text/css">
#container{
	background-color: #00CCFF;
	border: 1px;
	padding: 1em; 
};
</style>

<script type="text/javascript" 
	src="http://yui.yahooapis.com/combo?2.9.0/build/yahoo/yahoo-min.js&2.9.0/build/event/event-min.js&2.9.0/build/connection/connection-min.js">
</script>
 
</head>

<body>

<div id="container">
	<p>some text</p>
</div>

</body>

<script type="text/javascript">
	var sUrl = "php/get.php?username=anonymous&userid=0";
	
	var div = document.getElementById('container'); 
	 
		var handleSuccess = function(o){ 
		    if(o.responseText !== undefined){ 
		        div.innerHTML = "<li>Transaction id: " + o.tId + "</li>"; 
		        div.innerHTML += "<li>HTTP status: " + o.status + "</li>"; 
		        div.innerHTML += "<li>Status code message: " + o.statusText + "</li>"; 
		        div.innerHTML += "<li>HTTP headers: <ul>" + o.getAllResponseHeaders + "</ul></li>"; 
		        div.innerHTML += "<li>Server response: " + o.responseText + "</li>"; 
		        div.innerHTML += "<li>Argument object: Object ( [foo] => " + o.argument.foo + 
		                         " [bar] => " + o.argument.bar +" )</li>"; 
		    } 
		} 
		 
		var handleFailure = function(o){ 
		    if(o.responseText !== undefined){ 
		        div.innerHTML = "<li>Transaction id: " + o.tId + "</li>"; 
		        div.innerHTML += "<li>HTTP status: " + o.status + "</li>"; 
		        div.innerHTML += "<li>Status code message: " + o.statusText + "</li>"; 
		    } 
		} 
		 
		var callback = 
		{ 
		  success:handleSuccess, 
		  failure: handleFailure, 
		  argument: { foo:"foo", bar:"bar" } 
		}; 

	  var request = YAHOO.util.Connect.asyncRequest('GET', sUrl, callback); 
</script>

</html>